import { request } from "umi";

/**获取用户列表数据的方法  GET  /api/user/list */
export async function roleList(params?: any, options?: { [key: string]: any }) {
    return request<{
        data: API.CurrentUser;
    }>('/api/roles', {
        method: 'GET',
        params,
        ...(options || {}),
    });
}

/**添加角色的方法 */
export async function roleAdd(params: any, options?: { [key: string]: any }) {
    return request<{
        data: API.CurrentUser;
    }>('/api/roles', {
        method: 'POST',
        data: params,
        ...(options || {}),
    });
}


